﻿using System;
using System.Data;

namespace ZYCommon
{
    

    public class XMLHttpParameter : IDbDataParameter, IDataParameter
    {
        private System.Data.DbType intDbType;
        private ParameterDirection intDirection;
        private DataRowVersion intSourceVersion;
        public bool LongText;
        private object objValue;
        private string strParameterName;
        private string strSourceColumn;

        public XMLHttpParameter()
        {
            this.intDirection = ParameterDirection.Input;
            this.intSourceVersion = DataRowVersion.Default;
            this.intDbType = System.Data.DbType.String;
            this.objValue = null;
            this.strParameterName = null;
            this.strSourceColumn = null;
            this.LongText = false;
        }

        public XMLHttpParameter(string strValue)
        {
            this.intDirection = ParameterDirection.Input;
            this.intSourceVersion = DataRowVersion.Default;
            this.intDbType = System.Data.DbType.String;
            this.objValue = null;
            this.strParameterName = null;
            this.strSourceColumn = null;
            this.LongText = false;
            this.objValue = strValue;
        }

        public System.Data.DbType DbType
        {
            get
            {
                return this.intDbType;
            }
            set
            {
                this.intDbType = value;
            }
        }

        public ParameterDirection Direction
        {
            get
            {
                return this.intDirection;
            }
            set
            {
                this.intDirection = value;
            }
        }

        public bool IsNullable
        {
            get
            {
                return false;
            }
        }

        public string ParameterName
        {
            get
            {
                return this.strParameterName;
            }
            set
            {
                this.strParameterName = value;
            }
        }

        public byte Precision
        {
            get
            {
                return 0;
            }
            set
            {
            }
        }

        public byte Scale
        {
            get
            {
                return 0;
            }
            set
            {
            }
        }

        public int Size
        {
            get
            {
                return 0;
            }
            set
            {
            }
        }

        public string SourceColumn
        {
            get
            {
                return this.strSourceColumn;
            }
            set
            {
                this.strSourceColumn = value;
            }
        }

        public DataRowVersion SourceVersion
        {
            get
            {
                return this.intSourceVersion;
            }
            set
            {
                this.intSourceVersion = value;
            }
        }

        public object Value
        {
            get
            {
                return this.objValue;
            }
            set
            {
                this.objValue = value;
            }
        }
    }
}

